package net.carefx.pms.serivce.in;

public class MasterDataServiceProxy implements net.carefx.pms.serivce.in.MasterDataService {
  private String _endpoint = null;
  private net.carefx.pms.serivce.in.MasterDataService masterDataService = null;
  
  public MasterDataServiceProxy() {
    _initMasterDataServiceProxy();
  }
  
  public MasterDataServiceProxy(String endpoint) {
    _endpoint = endpoint;
    _initMasterDataServiceProxy();
  }
  
  private void _initMasterDataServiceProxy() {
    try {
      masterDataService = (new net.carefx.pms.serivce.in.MasterDataServiceServiceLocator()).getMasterDataServicePort();
      if (masterDataService != null) {
        if (_endpoint != null)
          ((javax.xml.rpc.Stub)masterDataService)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
        else
          _endpoint = (String)((javax.xml.rpc.Stub)masterDataService)._getProperty("javax.xml.rpc.service.endpoint.address");
      }
      
    }
    catch (javax.xml.rpc.ServiceException serviceException) {}
  }
  
  public String getEndpoint() {
    return _endpoint;
  }
  
  public void setEndpoint(String endpoint) {
    _endpoint = endpoint;
    if (masterDataService != null)
      ((javax.xml.rpc.Stub)masterDataService)._setProperty("javax.xml.rpc.service.endpoint.address", _endpoint);
    
  }
  
  public net.carefx.pms.serivce.in.MasterDataService getMasterDataService() {
    if (masterDataService == null)
      _initMasterDataServiceProxy();
    return masterDataService;
  }
  
  public net.carefx.pms.serivce.in.CommonResult saveOrUpdatePersonnel(net.carefx.pms.serivce.in.Personnel arg0) throws java.rmi.RemoteException{
    if (masterDataService == null)
      _initMasterDataServiceProxy();
    return masterDataService.saveOrUpdatePersonnel(arg0);
  }
  
  public net.carefx.pms.serivce.in.CommonResult saveOrUpdateSubspecialty(net.carefx.pms.serivce.in.Subspecialty arg0) throws java.rmi.RemoteException{
    if (masterDataService == null)
      _initMasterDataServiceProxy();
    return masterDataService.saveOrUpdateSubspecialty(arg0);
  }
  
  
}